package com.gigi.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import java.time.LocalDate;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableField;
import java.io.Serializable;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

/**
 * <p>
 * 考勤表
 * </p>
 *
 * @author AutoGenerator
 * @since 2024-01-15
 */
@TableName("attendance_record")
@ApiModel(value="AttendanceRecordEntity对象", description="考勤表")
public class AttendanceRecordEntity extends Model<AttendanceRecordEntity> {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "主键id")
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @ApiModelProperty(value = "课程id")
    @TableField("course_id")
    private Long courseId;

    @ApiModelProperty(value = "用户id（学生id）")
    @TableField("user_id")
    private Long userId;

    @ApiModelProperty(value = "考勤时间（签到开始时间）")
    @TableField("time")
    private LocalDate time;

    @ApiModelProperty(value = "考勤状态（0正常 1缺勤 0迟到 1请假）")
    @TableField("state")
    private Integer state;

    @ApiModelProperty(value = "有效性（0有效 1无效）")
    @TableField("flag")
    private Integer flag;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }
    public Long getCourseId() {
        return courseId;
    }

    public void setCourseId(Long courseId) {
        this.courseId = courseId;
    }
    public Long getUserId() {
        return userId;
    }

    public void setUserId(Long userId) {
        this.userId = userId;
    }
    public LocalDate getTime() {
        return time;
    }

    public void setTime(LocalDate time) {
        this.time = time;
    }
    public Integer getState() {
        return state;
    }

    public void setState(Integer state) {
        this.state = state;
    }
    public Integer getFlag() {
        return flag;
    }

    public void setFlag(Integer flag) {
        this.flag = flag;
    }

    @Override
    protected Serializable pkVal() {
        return this.id;
    }

    @Override
    public String toString() {
        return "AttendanceRecordEntity{" +
            "id=" + id +
            ", courseId=" + courseId +
            ", userId=" + userId +
            ", time=" + time +
            ", state=" + state +
            ", flag=" + flag +
        "}";
    }
}
